package com.drakulo.hi.gfx;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

public class Face {
	public static final int SIZE = 96;

	private String file;
	private int x;
	private int y;
	private Image cachedFace;

	public Face(String p_file, int p_x, int p_y) {
		this.file = p_file;
		this.x = p_x;
		this.y = p_y;
	}

	public Image getImage() throws SlickException {
		if (this.cachedFace != null) {
			return this.cachedFace;
		}
		this.cachedFace = ImageFactory.createFace(this.file, this.x, this.y);

		return this.cachedFace;
	}

}
